package com.spsoft.vatoutinv.enums;

/**
 * 纳税人类型枚举
 *
 * @author wangy
 */

public enum NsrlxEnum {

    _1("1", "一般纳税人"),
    _2("2", "小规模纳税人"),
    _3("3", "转登记小规模纳税人"),
    _4("4", "辅导期一般纳税人"),
    _5("5", "自然人");

    public final String key;
    public final String value;

    NsrlxEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public static boolean isInclude(String key) {
        boolean include = false;
        for (NsrlxEnum e : NsrlxEnum.values()) {
            if (e.getKey().equals(key)) {
                include = true;
                break;
            }
        }
        return include;
    }

    public static String getValueByKey(String key) {
        String value = "";
        for (NsrlxEnum e : NsrlxEnum.values()) {
            if (e.getKey().equals(key)) {
                value = e.value;
            }
        }
        return value;
    }

}
